<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<%@ page import="com.weitu.workflow.flowManagement.entity.WorkflowInstance,com.weitu.workflow.flowManagement.entity.WorkflowTaskInstance,com.weitu.workflow.flowManagement.entity.WorkItemInfo" %>
<!doctype html>
<html lang="zh">
<head>
    <title>人员指定选择界面</title>
    <%@include file="/common/header.jspf"%>
</head>
<body style="height:auto;">
<div class="form-wrap"  style="height:auto;">
    <div class="input-wrap">
        <input type="hidden" value="" id="nextUserId" />
        处理人：<input id="nextUser" type="text" name="name" class="easyui-textbox" style="width:150px;"/><a onclick="openFlowNextUserSelect();">选择人员</a>
    </div>
    <div class="form-button">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="fa fa-save fa-lg" id="leaveSave"  onclick="closeCurrentPage();">保存</a>
    </div>
</div>
<script type="text/javascript">
    function openFlowNextUserSelect(dom){
        /***
         * 选择处理人
         */
        WindowManager.openLayer({
            type: 2,
            title: '选择下一环节处理人',
            area: ['80%', '80%'],
            content: ROOT_PATH + '/permission/user/simpleList.shtml',
            callBack:function(data){//窗口关闭后的回调函数
                //得到动态指定选择的人员
                var userData=data[0];
                $('#nextUser').textbox('setValue',userData.name);
                $('#nextUser').textbox('setText',userData.realName);
            }
        });
    }
    /***
     * 关闭窗口
     */
    function closeCurrentPage() {
        var nextUserId=$('#nextUser').textbox('getValue');
        if(nextUserId==""){
            parent.layer.alert("请选择处理人!");
            return false;
        }
        WindowManager.closeLayer({
            returnValue:nextUserId
        });
    }
</script>
</body>
</html>
